.class public Lcom/jecelyin/editor/v2/ui/g;
.super Ljava/lang/Object;
.source "TabManager.java"

# interfaces
.implements Lcom/jecelyin/editor/v2/view/TabViewPager$h;


# instance fields
.field private final a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

.field private final b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

.field private c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

.field private d:Z


# direct methods
.method public constructor <init>(Lcom/jecelyin/editor/v2/ui/JeEditorActivity;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    .line 3
    new-instance v0, Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    invoke-direct {v0, p1}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    .line 4
    new-instance p1, Lcom/jecelyin/editor/v2/ui/g$a;

    invoke-direct {p1, p0}, Lcom/jecelyin/editor/v2/ui/g$a;-><init>(Lcom/jecelyin/editor/v2/ui/g;)V

    invoke-virtual {v0, p1}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;->a(Landroid/view/View$OnClickListener;)V

    .line 5
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->f:Landroidx/recyclerview/widget/RecyclerView;

    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V

    .line 6
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->g()V

    .line 7
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->b:Landroidx/appcompat/widget/Toolbar;

    new-instance v0, Lcom/jecelyin/editor/v2/ui/g$b;

    invoke-direct {v0, p0}, Lcom/jecelyin/editor/v2/ui/g$b;-><init>(Lcom/jecelyin/editor/v2/ui/g;)V

    invoke-virtual {p1, v0}, Landroidx/appcompat/widget/Toolbar;->setNavigationOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 8
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    invoke-virtual {p1, p0}, Lcom/jecelyin/editor/v2/view/TabViewPager;->setOnPageChangeListener(Lcom/jecelyin/editor/v2/view/TabViewPager$h;)V

    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/ui/g;)Lcom/jecelyin/editor/v2/ui/JeEditorActivity;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    return-object p0
.end method

.method private a(Landroid/view/View;)V
    .locals 2

    .line 3
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    .line 4
    sget v1, Lcom/jecelyin/editor/v2/j;->close_image_view:I

    if-ne v0, v1, :cond_0

    .line 5
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    invoke-virtual {p0, p1}, Lcom/jecelyin/editor/v2/ui/g;->a(I)V

    goto :goto_0

    .line 6
    :cond_0
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    .line 7
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->w()V

    .line 8
    invoke-virtual {p0, p1}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    :goto_0
    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/ui/g;Landroid/view/View;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/jecelyin/editor/v2/ui/g;->a(Landroid/view/View;)V

    return-void
.end method

.method static synthetic b(Lcom/jecelyin/editor/v2/ui/g;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->h()V

    return-void
.end method

.method static synthetic c(Lcom/jecelyin/editor/v2/ui/g;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/jecelyin/editor/v2/ui/g;->d:Z

    return p0
.end method

.method static synthetic d(Lcom/jecelyin/editor/v2/ui/g;)Lcom/jecelyin/editor/v2/adapter/EditorAdapter;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    return-object p0
.end method

.method private g()V
    .locals 9

    .line 1
    new-instance v0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-direct {v0, v1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    .line 2
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object v1, v1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    invoke-virtual {v1, v0}, Lcom/jecelyin/editor/v2/view/TabViewPager;->setAdapter(Landroidx/viewpager/widget/PagerAdapter;)V

    .line 3
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-static {v0}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/d;->w()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 4
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-static {v0}, Lcom/jecelyin/editor/v2/utils/b;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/utils/b;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/jecelyin/editor/v2/utils/b;->c(Z)Ljava/util/ArrayList;

    move-result-object v0

    .line 5
    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/jecelyin/editor/v2/utils/b$a;

    .line 6
    new-instance v5, Ljava/io/File;

    iget-object v3, v2, Lcom/jecelyin/editor/v2/utils/b$a;->a:Ljava/lang/String;

    invoke-direct {v5, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 7
    invoke-virtual {v5}, Ljava/io/File;->isFile()Z

    move-result v3

    if-nez v3, :cond_0

    goto :goto_0

    .line 8
    :cond_0
    iget-object v3, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    const/4 v4, 0x0

    iget v6, v2, Lcom/jecelyin/editor/v2/utils/b$a;->c:I

    iget v7, v2, Lcom/jecelyin/editor/v2/utils/b$a;->d:I

    iget-object v8, v2, Lcom/jecelyin/editor/v2/utils/b$a;->b:Ljava/lang/String;

    invoke-virtual/range {v3 .. v8}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ZLjava/io/File;IILjava/lang/String;)V

    .line 9
    iget-object v2, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v2

    sub-int/2addr v2, v1

    invoke-virtual {p0, v2}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    goto :goto_0

    .line 10
    :cond_1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    .line 11
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->h()V

    .line 12
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-static {v0}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/d;->g()I

    move-result v0

    if-ltz v0, :cond_2

    .line 13
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v1

    if-ge v0, v1, :cond_2

    .line 14
    invoke-virtual {p0, v0}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    .line 15
    :cond_2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/g$c;

    invoke-direct {v1, p0}, Lcom/jecelyin/editor/v2/ui/g$c;-><init>(Lcom/jecelyin/editor/v2/ui/g;)V

    invoke-virtual {v0, v1}, Landroidx/viewpager/widget/PagerAdapter;->registerDataSetObserver(Landroid/database/DataSetObserver;)V

    return-void
.end method

.method private h()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c()[Lcom/jecelyin/editor/v2/common/e;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;->a([Lcom/jecelyin/editor/v2/common/e;)V

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyDataSetChanged()V

    return-void
.end method

.method private i()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {p0}, Lcom/jecelyin/editor/v2/ui/g;->c()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getItem(I)Lcom/jecelyin/editor/v2/ui/b;

    move-result-object v0

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object v1, v1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->b:Landroidx/appcompat/widget/Toolbar;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/b;->h()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroidx/appcompat/widget/Toolbar;->setTitle(Ljava/lang/CharSequence;)V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 4

    const/4 v0, 0x1

    .line 22
    invoke-static {v0}, Lcom/jecelyin/editor/v2/ui/b;->a(Z)V

    .line 23
    iput-boolean v0, p0, Lcom/jecelyin/editor/v2/ui/g;->d:Z

    .line 24
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object v1, v0, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    if-eqz v1, :cond_0

    .line 25
    invoke-static {v0}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v0

    invoke-virtual {p0}, Lcom/jecelyin/editor/v2/ui/g;->c()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/jecelyin/editor/v2/d;->a(I)V

    .line 26
    :cond_0
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v0

    if-gtz v0, :cond_1

    .line 27
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->finish()V

    return-void

    .line 28
    :cond_1
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    const/4 v2, 0x0

    new-instance v3, Lcom/jecelyin/editor/v2/ui/g$e;

    invoke-direct {v3, p0, v0}, Lcom/jecelyin/editor/v2/ui/g$e;-><init>(Lcom/jecelyin/editor/v2/ui/g;I)V

    invoke-virtual {v1, v2, v3}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ILcom/jecelyin/editor/v2/common/d;)Z

    return-void
.end method

.method public a(I)V
    .locals 2

    .line 21
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/g$d;

    invoke-direct {v1, p0}, Lcom/jecelyin/editor/v2/ui/g$d;-><init>(Lcom/jecelyin/editor/v2/ui/g;)V

    invoke-virtual {v0, p1, v1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b(ILcom/jecelyin/editor/v2/common/d;)Z

    return-void
.end method

.method public a(Lcom/jecelyin/editor/v2/utils/ExtGrep;)Z
    .locals 1

    .line 11
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0, p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(Lcom/jecelyin/editor/v2/utils/ExtGrep;)V

    .line 12
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result p1

    const/4 v0, 0x1

    sub-int/2addr p1, v0

    invoke-virtual {p0, p1}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    return v0
.end method

.method public a(Ljava/io/File;IILjava/lang/String;)Z
    .locals 5

    .line 14
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_2

    .line 15
    iget-object v3, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v3, v2}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getItem(I)Lcom/jecelyin/editor/v2/ui/b;

    move-result-object v3

    .line 16
    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v4

    if-nez v4, :cond_0

    goto :goto_1

    .line 17
    :cond_0
    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 18
    invoke-virtual {p0, v2}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    return v1

    :cond_1
    :goto_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 19
    :cond_2
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v1, p1, p2, p3, p4}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(Ljava/io/File;IILjava/lang/String;)V

    .line 20
    invoke-virtual {p0, v0}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    const/4 p1, 0x1

    return p1
.end method

.method public a(Ljava/io/File;Ljava/lang/String;)Z
    .locals 1

    const/4 v0, 0x0

    .line 13
    invoke-virtual {p0, p1, v0, v0, p2}, Lcom/jecelyin/editor/v2/ui/g;->a(Ljava/io/File;IILjava/lang/String;)Z

    move-result p1

    return p1
.end method

.method public a(Ljava/lang/CharSequence;)Z
    .locals 7

    .line 9
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    sget v2, Lcom/jecelyin/editor/v2/m;->je_new_filename:I

    const/4 v3, 0x1

    new-array v4, v3, [Ljava/lang/Object;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v5

    add-int/2addr v5, v3

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    const/4 v6, 0x0

    aput-object v5, v4, v6

    invoke-virtual {v1, v2, v4}, Landroid/app/Activity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1, p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(Ljava/lang/String;Ljava/lang/CharSequence;)V

    .line 10
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result p1

    sub-int/2addr p1, v3

    invoke-virtual {p0, p1}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    return v3
.end method

.method public b()V
    .locals 6

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v0

    if-nez v0, :cond_0

    .line 3
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    sget v1, Lcom/jecelyin/editor/v2/m;->je_new_filename:I

    const/4 v2, 0x1

    new-array v3, v2, [Ljava/lang/Object;

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v5}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a()I

    move-result v5

    add-int/2addr v5, v2

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v3, v4

    invoke-virtual {v0, v1, v3}, Landroid/app/Activity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 4
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(Ljava/lang/String;Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method public b(I)V
    .locals 0

    .line 5
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->h()V

    .line 6
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->i()V

    return-void
.end method

.method public c()I
    .locals 1

    .line 6
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object v0, v0, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/view/TabViewPager;->getCurrentItem()I

    move-result v0

    return v0
.end method

.method public c(I)V
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object v0, v0, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    invoke-virtual {v0, p1}, Lcom/jecelyin/editor/v2/view/TabViewPager;->setCurrentItem(I)V

    .line 3
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->d:Lcom/jecelyin/editor/v2/view/TabViewPager;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/view/TabViewPager;->getCurrentItem()I

    move-result p1

    .line 4
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    invoke-virtual {v0, p1}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;->d(I)V

    .line 5
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/g;->i()V

    return-void
.end method

.method public d()Lcom/jecelyin/editor/v2/adapter/EditorAdapter;
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    return-object v0
.end method

.method public e()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return v0

    .line 2
    :cond_0
    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;->getItemCount()I

    move-result v0

    return v0
.end method

.method public f()V
    .locals 7

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v0

    .line 2
    iget-object v1, p0, Lcom/jecelyin/editor/v2/ui/g;->c:Lcom/jecelyin/editor/v2/adapter/EditorAdapter;

    iget-object v2, p0, Lcom/jecelyin/editor/v2/ui/g;->a:Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    sget v3, Lcom/jecelyin/editor/v2/m;->je_new_filename:I

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    add-int/lit8 v5, v0, 0x1

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    const/4 v6, 0x0

    aput-object v5, v4, v6

    invoke-virtual {v2, v3, v4}, Landroid/app/Activity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(Ljava/lang/String;Ljava/lang/CharSequence;)V

    .line 3
    invoke-virtual {p0, v0}, Lcom/jecelyin/editor/v2/ui/g;->c(I)V

    return-void
.end method

.method public onPageScrollStateChanged(I)V
    .locals 0

    return-void
.end method

.method public onPageScrolled(IFI)V
    .locals 0

    return-void
.end method

.method public onPageSelected(I)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/g;->b:Lcom/jecelyin/editor/v2/adapter/TabAdapter;

    invoke-virtual {v0, p1}, Lcom/jecelyin/editor/v2/adapter/TabAdapter;->d(I)V

    return-void
.end method
